package bTree.LeetCode;

public class 跳跃游戏 {
    public boolean canJump(int[] nums) {
        int step=1;
        for (int num : nums) {
            if (step==0)return false;
            step--;
            step=Math.max(step,num);
        }
        return true;
    }
}